#ifndef __MSG_H__
#define __MSG_H__

#include <rtthread.h>
#include <rtdevice.h>

#define MSG_TRANSFER_DONE    0
#define MSG_TRANSFER_ERROR      -1

#ifdef __cplusplus
extern "C" {
#endif

int msg_receive_request(rt_device_t dev, uint8_t* id, uint8_t* payload, uint16_t max_len);

int msg_send_response(rt_device_t dev, uint8_t id, uint8_t* payload, uint16_t pd_len);

#ifdef __cplusplus
}
#endif

#endif